home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CDTV / cdtvtools-20 / videodisc / grab.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-02-06  |  1.2 KB  |  55 lines

  1. /* Grab.rexx */
  2. /* This demonstrates how to automatically build a CDXL file. */
  3.  
  4. /* The boss says "I wanna see RESULTS!" */
  5. options results
  6.  
  7. /* Send commands to Art Department Professional */
  8. address "ADPro"
  9.  
  10. /* We want to load frames from the FrameGrabber */
  11. LFORMAT "FRAMEGRABBER"
  12.  
  13. /* We want normal IFF output files */
  14. SFORMAT "IFF"
  15.  
  16. /* Search for the first frame of my scene */
  17. address VIDEODISC.1 search 14173
  18.  
  19. /* We'll grab 1200 frames worth */
  20. do frame = 1 to 1200
  21.  
  22.     address "ADPro"
  23.  
  24.     /* Grab the video */
  25.     load "it" "FIELD1"
  26.  
  27.     /* I'm grabbing a letterboxed image, so I can throw some */
  28.     /* of it away */
  29.     OPERATOR "CROP_IMAGE" 280 120 20 40
  30.  
  31.     /* Shrink the image to the destination size */
  32.     ABS_SCALE 192 82
  33.  
  34.     /* Generate the HAM image */
  35.     EXECUTE
  36.  
  37.     /* Save it where XLMake can get at it */
  38.     SAVE "RAM:Temp" "IMAGE"
  39.  
  40.     /* Some commands for COMMAND */
  41.     ADDRESS COMMAND
  42.  
  43.     /* Keep the user informed */
  44.     say "Saving frame #" frame
  45.  
  46.     /* Append the frame we just saved onto the end of our CDXL file */
  47.     XLMAKE "-h" "RAM:Temp" "SDH0:bladerunner.xl"
  48.  
  49.     /* I know I'm going to have 15 frames / second or less, */
  50.     /* so it's OK to only grab every other frame */
  51.     address videodisc.1 step 2
  52.  
  53. /* Keep doin' it 'til it's done. */
  54. end
  55.